﻿using System;
using System.Collections.Generic;
using System.Reflection;

namespace Istace.Framework.Mapping.Core.Interfaces
{
    /// <summary>
    /// 
    /// </summary>
    public interface IMappingFrameworkBootstrapper
    {
        /// <summary>
        /// Initialize the mappinf framework for the current executing assembly.
        /// </summary>
        /// <param name="inspectReference">If true, all referenced assemblies will be inspected</param>
        /// <param name="reBrowse">If true, event if the assembly is already browsed, we will rebrowse it</param>
        /// <remarks>
        /// For instance, we mention My.Assembly in the configuration as the mapper container assemly.
        /// If inspectReference is set to true, all the assemblies referenced by My.Assemly will be inspected to check if they also contain mapper class.
        /// </remarks>
        void Initialize(bool inspectReference, bool reBrowse);

        /// <summary>
        /// Initialize the mappinf framework for the current executing assembly.
        /// </summary>
        /// <remarks>
        /// For instance, we mention My.Assembly in the configuration as the mapper container assemly.
        /// If inspectReference is set to true, all the assemblies referenced by My.Assemly will be inspected to check if they also contain mapper class.
        /// </remarks>
        void Initialize();

        /// <summary>
        /// Initialize the mapping framework
        /// </summary>
        /// <param name="baseAssembly">The base assembly</param>
        /// <param name="reBrowse">If true, event if the assembly is already browsed, we will rebrowse it</param>
        /// <param name="inspectReference">If true, all referenced assemblies will be inspected</param>
        void Initialize(Assembly baseAssembly, bool inspectReference, bool reBrowse);

        /// <summary>
        /// Gets the tuple from interface.
        /// </summary>
        /// <param name="type">The type.</param>
        /// <returns></returns>
        IEnumerable<MappingTuple> GetTupleFromMapperType(Type type);
    }
}
